package com.example.demo.mapper;

import com.example.demo.pojo.WalletLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface WalletLogMapper {
    @Insert("insert into wallet_log values(null,#{walletId},#{accountId},#{createTime},#{doSomething},#{status})")
    void insert(WalletLog walletLog);

    @Select("select * from wallet_log where account_id=#{accountId} and wallet_id=#{id} order by  create_time desc")
    List<WalletLog> select(Long accountId, Long id);
}
